package com.smbms.controller;

import com.smbms.pojo.Provider;
import com.smbms.service.ProService;
import com.smbms.util.Result;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

/**
 * 类名：ProController
 * 作者：小涛
 * 创建时间：2021/8/25-20:41
 * 功能：
 */
@Controller
@RequestMapping("/pro")
public class ProController {

    @Resource
    private ProService proService;

    @ResponseBody
    @RequestMapping("/findAll")
    public Result findAll() {
        List<Provider> roleList = proService.findAllPro();
        return new Result(true, "查询角色成功", roleList);
    }
}
